package com.hanhai.material.common.result;

/**
 * Project：health
 * Create by CC
 * Description:结果码
 */
public enum ResultCode {

    /* 成功 */
    SUCCESS(200, "成功!"),
    /* 默认失败 */
    FAIL(400, "暂无数据!"),
    UNAUTHORIZED(401, "未认证"),
    ERROR(402, "客户端错误"),
    NO_PERMISSION(403, "您没有权限"),
    NOT_FOUND(404, "未找到"),

    /* 参数错误*/
    PARAM_NOT_VALID(101, "参数无效"),
    PARAM_IS_BLANK(102, "参数为空"),
    PARAM_TYPE_ERROR(103, "参数类型错误"),
    PARAM_NOT_COMPLETE(104, "参数缺失"),

    /* 用户错误 */
    USER_NOT_LOGIN(201, "登录过期"),
    USER_ACCOUNT_EXPIRED(202, "账号已过期"),
    USER_CREDENTIALS_ERROR(203, "密码错误"),
    USER_CREDENTIALS_EXPIRED(204, "密码过期"),
    USER_ACCOUNT_DISABLE(205, "账号不可用"),
    USER_ACCOUNT_LOCKED(206, "账号被锁定"),
    USER_ACCOUNT_NOT_EXIST(207, "账号不存在"),
    USER_ACCOUNT_ALREADY_EXIST(208, "账号已存在"),
    USER_ACCOUNT_USE_BY_OTHERS(209, "账号下线"),
    USER_ACCOUNT_CREDENTIALS_EXPIRED(210, "输入信息有误，请检查");

    private Integer code;

    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
